package com.ysy.logistics.entities.sale;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ysy.common.entities.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @ClassDescription:
 * @Author:姚斯羽
 * @Create:2025/4/7 21:40
 **/
@Data
@TableName("customer")
@Schema(name = "customer", description = "客户")
@Accessors(chain = true)
public class Customer extends BaseEntity {
    @Schema(description = "客户id")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @Schema(description = "客户名称")
    @TableField(value = "name")
    @NotBlank(message = "客户名称不能为空")
    private String name;

    @Schema(description = "公司名称")
    @TableField(value = "company_name")
    @NotBlank(message = "公司名称不能为空")
    private String companyName;

    @Schema(description = "联系人")
    @TableField(value = "contact")
    private String contact;

    @Schema(description = "电话")
    @TableField(value = "phone_number")
    @NotBlank(message = "电话不能为空")
    private String phoneNumber;

    @Schema(description = "邮箱")
    @TableField(value = "email")
    private String email;

    @Schema(description = "地址")
    @TableField(value = "address")
    private String address;

    @Schema(description = "备注")
    @TableField(value = "remark")
    private String remark;
}
